using System;
using System.Collections.Generic;
using System.Linq;
using SqlSugar;

namespace Blog.Repository;


/// <summary>
/// 视图管理
///</summary>
[SugarTable("ad_view")]
public class ViewEntity : EntityFull
{

    /// <summary>
    /// 主键Id
    ///</summary>
    [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
    public long Id { get; set; }

    /// <summary>
    /// 所属节点
    ///</summary>
    [SugarColumn(ColumnName = "ParentId")]
    public long ParentId { get; set; }

    /// <summary>
    /// 视图命名
    ///</summary>
    [SugarColumn(ColumnName = "Name")]
    public string? Name { get; set; }

    /// <summary>
    /// 视图名称
    ///</summary>
    [SugarColumn(ColumnName = "Label")]
    public string? Label { get; set; }

    /// <summary>
    /// 视图路径
    ///</summary>
    [SugarColumn(ColumnName = "Path")]
    public string? Path { get; set; }

    /// <summary>
    /// 说明
    ///</summary>
    [SugarColumn(ColumnName = "Description")]
    public string? Description { get; set; }

    /// <summary>
    /// 启用
    ///</summary>
    [SugarColumn(ColumnName = "Enabled")]
    public bool Enabled { get; set; }

    /// <summary>
    /// 缓存
    ///</summary>
    [SugarColumn(ColumnName = "Cache")]
    public bool Cache { get; set; }

    /// <summary>
    /// 排序
    ///</summary>
    [SugarColumn(ColumnName = "Sort")]
    public int Sort { get; set; }

    /// <summary>
    /// 版本
    ///</summary>
    [SugarColumn(ColumnName = "Version")]
    public long Version { get; set; }


    [SugarColumn(IsIgnore = true)]
    public List<ViewEntity> Children { get; set; }
}
